import random


num = input("请输入数字")
n=0

r1 = random.randint(1,10)
print(r1)

while int(num) != r1:
    n+=1
    num = input("请输入数字")
    print(r1)
    print(n)
    str1 = input('还玩吗')
    if str1 == 'no':
        break
    else:
        continue

print('对了')